const fs = require("fs");

let ws = fs.createWriteStream("./观书有感.txt");

//写入数据到流
ws.write("半亩方塘一鉴开\r\n");
ws.write("天光云影共徘徊\r\n");
ws.write("问渠那得清如许\r\n");
ws.write("为有源头活水来\r\n");

//关闭写入流，表明已没有数据要被写入可写流
//可选操作
ws.close();
